/*
 * =====================================================================================
 * Copyright (C) 2023 Ingenic Semiconductor Co.,Ltd
 * All Rights Reserved
 *
 * Filename     : pwm.h
 * Author       : Keven <keven.ywhan@ingenic.com>
 * Created      : 2024/07/09 14:56
 * Description  :
 *
 * =====================================================================================
 */

#ifndef __PWM_H__
#define __PWM_H__

#define PWM_INIT_HIGH	(1)
#define PWM_INIT_LOW	(0)

struct pwm_config {
	uint32_t period_ns;
	uint32_t duty_ns;
	uint8_t init_level;
};

int32_t pwm_channel_config(uint32_t chn, struct pwm_config *config);
int32_t pwm_channel_updata_config(uint32_t chn, struct pwm_config *config);
int32_t pwm_channel_enable(uint32_t chn);
int32_t pwm_channel_disable(uint32_t chn);

#endif /* __PWM_H__ */

